//
//  APIManager.h
//  village_ios
//
//  Created by mac on 2019/8/10.
//  Copyright © 2019 com.sw.village. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface APIManager : NSObject

typedef void(^Success)(id response);
typedef void(^Failure)(NSError *error);
typedef void(^LoginFailure)(NSError *error);




+ (void)requestWithUrlString:(NSString *)UrlString
                      params:(NSDictionary *)params
                      method:(NSString *)method
                     success:(Success)success
                     failure:(Failure)failure ;


+ (NSString *)URLRequestStringWithURL:(NSString *)urlstr dict:(NSDictionary *)dict;

+ (void)uploadImageToServerWithImage:(UIImage *)image
                                type:(NSString *)type
                             success:(Success)success
                             failure:(Failure)failure;
@end


